#!/bin/bash
setenforce 0
/etc/init.d/iptables stop
yum install ipvsadm -y
/etc/init.d/ipvsadm save
/etc/init.d/ipvsadm start
echo "1" > /proc/sys/net/ipv4/conf/all/send_redirects
echo "1" > /proc/sys/net/ipv4/conf/default/send_redirects
echo "1" > /proc/sys/net/ipv4/conf/eth0/send_redirects
route add -host 10.10.10.100 dev eth1
ipvsadm -C
ipvsadm -A -t 10.10.10.100:80 -s wlc -p
ipvsadm -a -t 10.10.10.100:80 -r 10.10.10.11:80 -g -w 1
ipvsadm -a -t 10.10.10.100:80 -r 10.10.10.12:80 -g -w 1
ipvsadm -a -t 10.10.10.100:80 -r 10.10.10.13:80 -g -w 1
ipvsadm --set 30 120 300
ipvsadm -ln
